#include <stdio.h>

int main() {
    int N;
    scanf("%d", &N);

    char a[7]; // 6位数字 + 1个结束符

    for (int i = 0; i < N; i++) {
        scanf("%s", a); // 读入6位数字的字符串

        int sum1 = a[0] - '0' + a[1] - '0' + a[2] - '0';
        int sum2 = a[3] - '0' + a[4] - '0' + a[5] - '0';

        if (sum1 == sum2) {
            printf("You are lucky!\n");
        } else {
            printf("Wish you good luck.\n");
        }
    }

    return 0;
}
